package com.zengqingfa.designpattern.create.factory.simple;

/**
 *
 * @fileName: Client
 * @author: zengqf3
 * @date: 2021-4-21 17:19
 * @description:
 */
public class Client {

    public static void main(String[] args) {
        //普通工厂
        ProductFactory factory=new ProductFactory();
        Product product1 = factory.createProduct1(1);
        System.out.println(product1.getName());

        //静态工厂
        Product product2 = ProductFactory.createProduct2(1);
        System.out.println(product2.getName());
    }
}
